home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / dos / exallend.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  2KB  |  82 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: exallend.c,v 1.1 1996/09/11 12:54:45 digulla Exp $
  4.     $Log: exallend.c,v $
  5.     Revision 1.1  1996/09/11 12:54:45  digulla
  6.     A couple of new DOS functions from M. Fleischer
  7.  
  8.     Desc:
  9.     Lang: english
  10. */
  11. #include <exec/memory.h>
  12. #include <clib/exec_protos.h>
  13. #include <dos/filesystem.h>
  14. #include <dos/dosextens.h>
  15. #include <dos/exall.h>
  16. #include "dos_intern.h"
  17.  
  18. /*****************************************************************************
  19.  
  20.     NAME */
  21.     #include <clib/dos_protos.h>
  22.  
  23.     __AROS_LH5(void, ExAllEnd,
  24.  
  25. /*  SYNOPSIS */
  26.     __AROS_LHA(BPTR,                  lock,    D1),
  27.     __AROS_LHA(struct ExAllData *,    buffer,  D2),
  28.     __AROS_LHA(LONG,                  size,    D3),
  29.     __AROS_LHA(LONG,                  data,    D4),
  30.     __AROS_LHA(struct ExAllControl *, control, D5),
  31.  
  32. /*  LOCATION */
  33.     struct DosLibrary *, DOSBase, 165, Dos)
  34.  
  35. /*  FUNCTION
  36.  
  37.     INPUTS
  38.  
  39.     RESULT
  40.  
  41.     NOTES
  42.  
  43.     EXAMPLE
  44.  
  45.     BUGS
  46.  
  47.     SEE ALSO
  48.  
  49.     INTERNALS
  50.  
  51.     HISTORY
  52.     29-10-95    digulla automatically created from
  53.                 dos_lib.fd and clib/dos_protos.h
  54.  
  55. *****************************************************************************/
  56. {
  57.     __AROS_FUNC_INIT
  58.     __AROS_BASE_EXT_DECL(struct DosLibrary *,DOSBase)
  59.     
  60.     /* Get pointer to filehandle */
  61.     struct FileHandle *fh=(struct FileHandle *)BADDR(lock);
  62.  
  63.     /* Get pointer to process structure */
  64.     struct Process *me=(struct Process *)FindTask(NULL);
  65.  
  66.     /* Get pointer to I/O request. Use stackspace for now. */
  67.     struct IOFileSys io,*iofs=&io;
  68.  
  69.     /* Prepare I/O request. */
  70.     iofs->IOFS.io_Message.mn_Node.ln_Type=NT_REPLYMSG;
  71.     iofs->IOFS.io_Message.mn_ReplyPort   =&me->pr_MsgPort;
  72.     iofs->IOFS.io_Message.mn_Length      =sizeof(struct IOFileSys);
  73.     iofs->IOFS.io_Device =fh->fh_Device;
  74.     iofs->IOFS.io_Unit   =fh->fh_Unit;
  75.     iofs->IOFS.io_Command=FSA_EXAMINE_ALL_END;
  76.     iofs->IOFS.io_Flags  =0;
  77.  
  78.     /* Send the request. May not fail. */
  79.     DoIO(&iofs->IOFS);
  80.     __AROS_FUNC_EXIT
  81. } /* ExAllEnd */
  82.